package com.xbongbong.pro.message.service;

import com.alibaba.dingtalk.openapi.helper.DingtalkWorkrecordHelper;
import com.xbongbong.message.domain.entity.PushEntity;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.saas.domain.entity.ext.CommunicatePlanEntityExt;
import com.xbongbong.sys.domain.entity.UserEntity;

import java.util.List;

public interface DingtalkWorkrecordMessage {

    /**
     * 创建钉钉待办实例
     * @param corpid
     * @param dingtalkProcessCode
     * @param pushEntity
     * @param url 	实例在审批应用里的跳转url，需要同时适配移动端和pc端
     * @param communicatePlanEntity
     * @return
     * @throws
     * @author xingxing.xiao
     * @date 2019/07/20 14:20
     */
    DingtalkWorkrecordHelper.ProcessInstanceResponse createWorkrecordInstance(String corpid, String dingtalkProcessCode, PushEntity pushEntity, String url, CommunicatePlanEntityExt communicatePlanEntity) throws XbbException;

    /**
     * 发送钉钉待办任务
     * @param corpid
     * @param processInstanceId
     * @param activityId
     * @param url
     * @param userList
     * @return
     * @throws
     * @author xingxing.xiao
     * @date 2019/07/20 14:21
     */
    DingtalkWorkrecordHelper.TaskResponse createWorkrecordTask(String corpid, String processInstanceId, String activityId, String url, List<UserEntity> userList) throws XbbException;

}
